﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ListaDistribucionEdit.aspx.cs"
    Inherits="CrmContacto.WebApp.App.ListaDistribucionEdit" %>

<%@ Import Namespace="Web.Framework.Translate" %>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" src="/Scripts/App/ListaDistribucionEdit.js"></script>
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <asp:Literal ID="lit1" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["Bo.ListaDistribucion.EditTitle"]%>' />
        <img width="15px" height="15px" id="imgExpand" class="imgExpand" src="/Images/icon_blockexpanded.png"
            onclick="window.AppCommonObj.toggleVisibility(this.id, 'campaniaEditDiv');" alt="" />
        <span class="clear"></span>
    </h2>
    <div class="editionContainerFilter" id="campaniaEditDiv">
        <asp:HiddenField ID="hidId" runat="server" />
        <p>
            <span class="title2">
                <asp:Literal ID="Literal10" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["ListaDistribucion.Nombre"]%>' />:</span>
            <asp:TextBox ID="txtNombre" runat="server" CssClass="inputs inputlong" ClientIDMode="Static"
                title='<%$ Code:  LocalizationProvider.Instance["ListaDistribucion.Nombre"] %>'></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title2">
                <asp:Literal ID="Literal2" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["ListaDistribucion.Descripcion"]%>' />:</span>
            <asp:TextBox ID="txtDescripcion" runat="server" CssClass="inputs inputMultiline"
                ClientIDMode="Static" TextMode="MultiLine" title='<%$ Code:  LocalizationProvider.Instance["ListaDistribucion.Descripcion"] %>'></asp:TextBox>
        </p>
        <div class="clear">
        </div>
        <div class="divp">
            <span class="title2">
                <asp:Literal ID="Literal9" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["ListaDistribucion.Estado"]%>' />:</span>
            <asp:DropDownList ID="cboEstadoListaDistribucion" runat="server" CssClass="cbo readonly"
                ClientIDMode="Static" Enabled="false">
            </asp:DropDownList>
        </div>
        <div class="clear">
        </div>
    </div>
    <div class="commandBarDiv">
        <asp:LinkButton ID="lnkGuardar" runat="server" CssClass="guardar" ClientIDMode="Static"
            Text='<%$ Code: LocalizationProvider.Instance["Bo.Command.Guardar"]%>'></asp:LinkButton>
        <div class="clear">
        </div>
    </div>
    <div>
        <h2 class="h2Excel">
            <asp:Image Width="15px" Height="15px" ID="Image1" CssClass="imgExpand" ImageUrl="/Images/icon_blockcollapsed.png"
                runat="server" ClientIDMode="Static" alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'pnlResults');" />
            <asp:Literal ID="Literal1" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.ListaDistribucion.EditContactoList"] %>' />
            <asp:Label ID="Label1" runat="server" Text="" CssClass="lblSearchResult"></asp:Label>
        </h2>
        <div class="divExportarAExcelGrid">
                <asp:LinkButton ID="lnkExportarAExcel" CssClass="promolnkExportarAExcel" ClientIDMode="Static"
                    OnClick="lnkExportarAExcel_Click" runat="server">
                    <img style="text-decoration: none; border: 0px; margin-right: 4px" src="../Images/excel.png"
                        alt="" /><asp:Literal ID="Literal24" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Bo.SearchContacto.CmdExportarExcel"]%>' /></asp:LinkButton>
            </div>
            <div class="clear">
            </div>
    </div>
    <asp:Panel ID="pnlContactos" CssClass="editionContainerForGrid" runat="server" ClientIDMode="Static">
        <div class="clear">
        </div>
        <asp:GridView ID="GridContactos" runat="server" CellPadding="4" ForeColor="#333333"
            ViewStateMode="Enabled" GridLines="None" AutoGenerateColumns="False" DataKeyNames="Id"
            Width="100%" AllowPaging="False" OnRowCommand="GridContactos_RowCommand" OnRowDataBound="GridContactos_RowDataBound">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:ButtonField ButtonType="Image" CommandName="editar" ImageUrl="~/Images/editar.png"
                    Text="Button" AccessibleHeaderText="editar">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>
                <asp:TemplateField HeaderText="">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:ImageButton ID="btnEliminar" runat="server" ImageUrl="~/Images/eliminar.png"
                            CommandName="eliminar" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Id" HeaderText="Id" Visible="false">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Email" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Email"] %>'
                    SortExpression="Email">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Nombre" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Nombre"] %>'
                    SortExpression="Nombre">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Apellido" HeaderText='<%$ Code:  LocalizationProvider.Instance["Contacto.Apellido"] %>'
                    SortExpression="Apellido">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left"
                CssClass="gridSortingHeader" />
            <PagerStyle BackColor="#4b6c9e" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" CssClass="gridSortingHeader" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" CssClass="gridSortingHeader" />
        </asp:GridView>
    </asp:Panel>
    <div class="clear">
    </div>
    <script type='text/javascript'>

        $(document).ready(function () {

            if (!window.AppCommonObj) {
                window.AppCommonObj = new AppCommon();
            }

            if (!window.CrmCommonObj) {
                window.CrmCommonObj = new CrmCommon();
            }

            if (!window.ListaDistribucionEditObj) {
                window.ListaDistribucionEditObj = new ListaDistribucionEdit();
            }

            $('input[title]').inputHints();

            document.DirtyCheck = new DirtyCheck();
            document.DirtyCheck.loadControlState();

            AppCommonObj.ConfirmMovePage();

        });
    </script>
</asp:Content>
